
# coding:utf-8


# http://www.practicepython.org/
# https://www.kokugobunpou.com/助動詞/助動詞-2-せる-させる/
import os
import datetime
# practice 1
# now =  datetime.datetime.now()
# age = eval(raw_input("input your age:"))
# year_100 = now.year - int(age) + 100
# print "Hello " + str(year_100) + " you will be 100 year"

# practice 2
# num = eval(raw_input("please input a number:"))
# if (num % 2 ) == 1 :
# 	print str(num) + " is Odd"
# elif (num % 2 )== 0:
# 	print str(num) + " is Even"


# import array
#practice 3
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# res = []
# for n in a :
# 	if n < 5: res.append(n)
# # do in one line
# print [elt for elt in a if elt < 5 ]

# practice 4　　divisor
# userinput = eval(raw_input("please input a number"))
# resholder = []
# cntarr = range(1,userinput+1)
# for i,x in cntarr :
# 	print index
# 	if userinput%x == 0: resholder.append(x)
# print resholder


#practice5
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
# c = [ x for x in a if x in b ]
# remove duplicate 
# c = list(set(c))
# print c

#practice 7
# word = "1234"
# #reverse the string
# rword = word[::-1]
# if word == rword : print "it's a palindrome word" 
# print str(rword)

#practice 8
# a = list([1, 4, 9, 16, 25, 36, 49, 64, 81, 100])
# # solution 1
# print [x for x in a if x <= a[6]]
# #solution 2
# resholder = []
# for index in range(0,len(a)):
# 	if index<=6 :
# 		resholder.append(a[index])
# print resholder

# pratice 8  Rock Paper Scissor
# def start():
# 	user1 = raw_input("input Rock, Paper ,Scissor").lower()
# 	user2 = raw_input("input Rock, Paper ,Scissor").lower()

# 	if user1 == "rock":
# 		if user2 == "rock" : return 0
# 		if user2 == "paper" :return -1
# 		if user2 == "scissor": return 1

# 	if user1 == "paper":
# 		if user2 == "paper" :return 0
# 		if user2 == "scissor" :return -1
# 		if user2 == "rock" :return 1

# 	if user1 == "scissor":
# 		if user2 == "scissor": return 0
# 		if user2 == "rock": return -1
# 		if user2 == "paper": return 1

# def logic():
# 	dict = {-1:"負けた",0:"平和",1:"勝つ"}
# 	res = start()
# 	print dict.get(res)

# 	goon = raw_input("続きますか？Y/N").lower()
# 	if goon == "n":  logic()
# logic()


# pratice 9 Guessing Game

# import random
# def complogic(base,guess):
# 	return guess - base
# def getinput():
# 	input = raw_input("please guess the number computer has prepared for you:")
# 	if(input == "exit") :
# 		exit()
# 	try:
# 		input = int(input)
# 	except Exception as inst:
# 		# print(type(inst))
# 		# print(inst.args)
# 		# x, y = inst.args
# 		exit()
# 	return input

# while True:
# 	print "start game ..."
# 	print "type exit to quit game"
# 	number = random.randint(1,9)
# 	allow_repeat_cnt = 3

# 	while allow_repeat_cnt  > 0 :
# 		allow_repeat_cnt = allow_repeat_cnt -1
# 		guess = getinput()
# 		res = complogic(number,guess)
# 		if res == 0: 
# 			print "right ";break;
# 		if res > 0 :
# 			if allow_repeat_cnt > 0:
# 				print "hint , it's lesser than you think" 
# 		if res < 0 :
# 			print "hint , it's great than you think" 
# 	else:
# 		print "chance are over, actually it's " + str(number)	
# 	print "\n\n\n"	
# 	pass


# pratice 10 
# a = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89]
# b = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
# print set([x for x in a if x in b])

# pratice 11 
# import random 
# list1= random.sample(range(1,30), 10)
# print [list1[0], list1[-1]]


#fibonacci 13
# def getfibonacci_forward(list):
# 	sum = 0
# 	for i in list: 
# 		sum = sum + i
# 	list.append(sum)
# 	return list

# num = eval(raw_input("how many number do you want :"))
# count = 0
# list = [1]
# while count < num:
# 	list = getfibonacci(list)
# 	count = count + 1
# print "result is :" + str(list)